/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.src.uniandes.ecos.tsp.creditscore.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author AndhyMao
 */
@Embeddable
public class MunicipioPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "dep_codigo")
    private int depCodigo;
    @Basic(optional = false)
    @Column(name = "mun_codigo")
    private int munCodigo;

    public MunicipioPK() {

    }

    public MunicipioPK(int depCodigo, int munCodigo) {
        this.depCodigo = depCodigo;
        this.munCodigo = munCodigo;
    }

    public int getDepCodigo() {
        return depCodigo;
    }

    public void setDepCodigo(int depCodigo) {
        this.depCodigo = depCodigo;
    }

    public int getMunCodigo() {
        return munCodigo;
    }

    public void setMunCodigo(int munCodigo) {
        this.munCodigo = munCodigo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) depCodigo;
        hash += (int) munCodigo;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MunicipioPK)) {
            return false;
        }
        MunicipioPK other = (MunicipioPK) object;
        if (this.depCodigo != other.depCodigo) {
            return false;
        }
        if (this.munCodigo != other.munCodigo) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.src.uniandes.ecos.tsp.creditscore.entity.MunicipioPK[depCodigo=" + depCodigo + ", munCodigo=" + munCodigo + "]";
    }

}
